<!DOCTYPE html>
<html>
<head>
  <title>杭州有佳精密机械有限公司</title>
  <meta charset="utf-8"/>
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
  <meta name="description" content="page description"/>
  <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
  <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
  <%= csrf_meta_tags %>
</head>
<body class="no-skin">

<div class="navbar navbar-default navbar-fixed-top" id="navbar">
  <div id="navbar-container" class="navbar-container">
    <div class="navbar-header pull-left">
      <a href="#" class="navbar-brand">
        <small>
          <i class="fa fa-sun-o"></i>
          杭州有佳售后服务管理平台
        </small>
      </a>
    </div>
    <% if current_user.present? %>
        <div class="navbar-header pull-right" role="navigation">
          <ul class="ace ace-nav">
            <li class="light-blue" style=" list-style-type: none; ">
              <%= link_to destroy_user_session_path, method: :delete, class: '' do %>
                  <!--<a data-toggle="dropdown" href="#" class="dropdown-toggle">-->
                  <i class="fa fa-user fa-lg"></i>
              <span class="user-info">
                <small>欢迎,</small> <%= current_user.name %>
              </span>
                  <i class="ace-icon fa fa-caret-down"></i>
                  <!--</a>-->
              <% end %>
              <ul class="user-menu dropdown-menu dropdown-menu-right dropdown-yellow dropdown-caret dropdown-close">
                <li><a href="/front/users/change_password"><i class="ace-icon fa fa-cog"></i> 修改密码</a></li>
                <li class="divider"></li>
                <li>
                  <%= link_to destroy_user_session_path, method: :delete do %>
                      <i class="icon-off"></i> <%= t 'login.logout' %>
                  <% end %>
                </li>
              </ul>
            </li>
          </ul>
        </div>
    <% end %>
  </div>
</div>
<div class="main-container" id="main-container">
  <!--<div class="su-ui">-->
  <div class="sidebar responsive-min">
    <su-sidebar fixed data-turbolinks-permanent>
      <div slot="shortcuts">
        <div class="sidebar-shortcuts-large" id="sidebar-shortcuts-large">
          <a class="btn btn-success" href="/">
            <i class="ace-icon fa fa-home"></i>
          </a>

          <a class="btn btn-info" href="<%#= registrations_front_booking_index_path %>">
            <i class="ace-icon fa fa-map-signs"></i>
          </a>

          <!-- #section:basics/sidebar.layout.shortcuts -->
          <a class="btn btn-warning" href="/front/users/change_password">
            <i class="ace-icon fa fa-key"></i>
          </a>

          <%= link_to '/users/sign_out', class: 'btn btn-danger', method: :delete do %>
              <i class="ace-icon fa fa-sign-out"></i>
          <% end %>

          <!-- /section:basics/sidebar.layout.shortcuts -->
        </div>

        <div class="sidebar-shortcuts-mini" id="sidebar-shortcuts-mini">
          <span class="btn btn-success"></span>

          <span class="btn btn-info"></span>

          <span class="btn btn-warning"></span>

          <span class="btn btn-danger"></span>
        </div>
      </div>
      <ul class="nav nav-list" slot="nav">
        <nav-item title="首页" href="<%= root_path %>" icon="dashboard"
                  active-pattern="<%= "^#{root_path}$" %>"></nav-item>

        <% if Rails.env == 'development' %>
            <nav-item title="样式(开发环境可见)" href="<%= guide_path %>" icon="desktop"></nav-item>
        <% end %>
      </ul>
      <div class="sidebar-toggle sidebar-collapse" slot="sidebar-toggle">
        <i id="sidebar-toggle-icon" class="ace-icon fa fa-angle-double-left ace-save-state" data-icon1="ace-icon fa fa-angle-double-left" data-icon2="ace-icon fa fa-angle-double-right"></i>
      </div>
    </su-sidebar>
  </div>
  <!--</div>-->
  <div class="main-content">
    <div class="breadcrumbs breadcrumbs-fixed su-ui">
      <su-breadcrumbs :data='<%= @breadcrumbs.to_json.html_safe %>'></su-breadcrumbs>
    </div>
    <div class="page-content">
      <div class="page-header su-ui">
        <% if content_for?(:header) %>
            <%= yield(:header) %>
        <% else %>
            <h1>
              <%= @breadcrumbs[-1][:title] if @breadcrumbs and @breadcrumbs[-1] %>

              <% if @breadcrumbs and @breadcrumbs[-2] %>
                  <small>
                    <i class="ace-icon fa fa-angle-double-left fa-fw"></i>
                    <a href="<%= @breadcrumbs[-2][:src] %>" v-su-color="#888">
                      <%= @breadcrumbs[-2][:title] %>
                    </a>
                  </small>
              <% end %>
            </h1>
        <% end %>
      </div>
      <div class="row">
        <div class="col-xs-12">
          <% if notice %>
              <div class="alert alert-block alert-success">
                <button type="button" class="close" data-dismiss="alert">
                  <i class="ace-icon fa fa-times"></i>
                </button>

                <p>
                  <strong>
                    <i class="ace-icon fa fa-check"></i>

                  </strong><%= notice %>
                </p>
              </div>
          <% end %>
          <%= yield %>
        </div>
      </div>
    </div>
  </div>
</div>
</body>
</html>
